/* output.h */

/**
 * @file
 * This module provides functions for writing compressed and uncompressed files.
 */

#ifndef OUTPUT_H
#define	OUTPUT_H

#include "btree_types.h"

/**
 * Writes the given source in a compressed way, based on the given codes table,
 * to a text file with the specified name.
 *
 * @param out_filename - The name of the output textfile.
 * @param source -
 * @param codes - The codes used to replace the ANSI symbols.
 */
extern void write_compressed_file(char *out_filename, char *source,
                                  char *codes[]);

/**
 * Writes the given source in an uncompressed way, based on the given code
 * tree, to a text file with the specified name.
 *
 * @param out_filename - The name of the output textfile.
 * @param source - the compressed data
 * @param codes - The code tree used to decompress the codes
 */
extern void write_uncompressed_file(char *out_filename, unsigned char *source,
                                    BTREE *code_tree, int symbol_count);

#endif	/* OUTPUT_H */

